import java.io.Serial;

class MyException extends Exception {
    @Serial
    private static final long serialVersionUID = 114514415411L;

    public MyException() {
    }

    public MyException(String message) {
        super(message);
    }

}

class MyExceptionTest {
    public void register(int num) throws MyException {
        if (num < 0)
            throw new MyException("人数为负值，不合理");
        else
            System.out.println("登记人数" + num);
    }

    public void manager() {
        try {
            register(100);
        } catch (MyException e) {
            System.out.print("登记失败，出错种类");
        }
        System.out.print("本次登记操作结束");
    }

    public static void main(String[] args) {
        MyExceptionTest t = new MyExceptionTest();
        t.manager();
    }
}